ostbuild: Support rm-configure flag
authorColin Walters <walters@verbum.org>
Tue, 17 Jan 2012 01:17:39 +0000 (20:17 -0500)
committerColin Walters <walters@verbum.org>
Tue, 17 Jan 2012 01:17:39 +0000 (20:17 -0500)
This is easier than making git patches that delete configure.

src/ostbuild/pyostbuild/builtin_build.py

index 43d4c7293b5f187f81331cd230c1b74702680175..670b4e8c15a45b1201c6517de489543ce76e6f54 100755 (executable)
@@ -181,6 +181,11 @@ class OstbuildBuild(builtins.Builtin):
         mirror = os.path.join(self.mirrordir, name)
         component_src = self._get_vcs_checkout(name, keytype, mirror, branch)
 
+        if meta.get('rm-configure', False):
+            configure_path = os.path.join(component_src, 'configure')
+            if os.path.exists(configure_path):
+                os.unlink(configure_path)
+
         buildroot_version = self._compose_buildroot(buildroot_name, meta, dependencies, architecture)
 
         artifact_meta = {'buildroot': buildroot_name,